import Vue from 'vue'
import App from './App'
import router from './router'
// import VueRouter from 'vue-router'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import store from './vuex/index'
import VueLazyLoad from 'vue-lazyload'
import vuePicturePreview from 'vue-picture-preview'
import './common/style.css'

Vue.use(vuePicturePreview)
Vue.use(MintUI)
Vue.use(VueLazyLoad, {
  loading: require('./assets/lazy.png')
})
Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  //获得初始化数据
  beforeCreate() {
    this.$store.dispatch('getDialogData');
    this.$store.dispatch('getUserData');
  },
  template: '<App/>',
  components: {App}
})
